/**
 * 
 */
package kit4j.ui.cs.swing.dnd;

import java.awt.Component;
import java.awt.Container;

import javax.swing.TransferHandler.TransferSupport;

/**
 * @author MiniKnife
 *
 */
public class InsertComponentDropper extends AbstractComponentDropper {
	
	public InsertComponentDropper(Container container) {
		super(container);
	}

	/**
	 * @see kit4j.ui.cs.swing.dnd.AbstractComponentDropper#addComponent(java.awt.Container,
	 *      java.awt.Component)
	 */
	@Override
	protected boolean addComponent(Container container, Component comp,
			TransferSupport support) {
//		Component oldComp = container.getComponentAt(support.getDropLocation()
//				.getDropPoint());
//		int index = container.getComponentZOrder(oldComp);
//		
//		container.remove(oldComp);
//		container.add(comp, index);
//		if (this.container != null && this.container == container) {
//			this.container.remove(comp);
//		}
		container.add(comp);

		return true;
	}

}
